﻿namespace TestApp.Contracts
{
    using System;
    using System.Diagnostics.Contracts;
    using System.Runtime.Serialization;

    [DataContract]
    public sealed class DataEntityDto : EntityDto
    {
        public const int EntityCount = 20;

        public DataEntityDto(int index)
        {
            Contract.Requires<ArgumentOutOfRangeException>(index >= 0 && index < EntityCount);

            Index = index;
        }

        [DataMember]
        public int Index { get; private set; }
    }
}
